from django.urls import path
from . import views
from . import booktype_views
from . import tests

# 应用名称（命名空间）避免多个应用中存在多个相同name时无法区分
app_name = "sys_book"

urlpatterns = [
    path("testApi", views.testApi, name="testApi"),
    path("test1", tests.test1, name="test1"),

    path("queryBooks", views.query_book_list, name="queryBookList"),
    path("uploadBook", views.add_book_info, name="addBookInfo"),
    path("queryBookDetail", views.query_book_detail, name="queryBookDetail"),

    path("queryBookTypes", booktype_views.query_book_type_list, name="queryBookTypeList"),
    path("addBookType", booktype_views.add_book_type, name="addBookType"),
    path("deleteBookType/<str:typeId>", booktype_views.deleteBookType, name="deleteBookType"),
    path("updateBookType", booktype_views.updateBookType, name="updateBookType"),

    path("downloadImage", views.downloadImage, name="downloadImage")
]
